package com.gufe.mapper.admin.mmp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gufe.entity.Swiper;
import com.gufe.vo.SwiperVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


@Mapper
public interface SwiperMapper {

    /*查询首页所有的轮播图图片及描述*/
    @Select("select id,img,text from index_slider")
    List<SwiperVO> getAllIndexImg();
    /*查询首页所有的轮播图图片及描述*/
    @Select("select * from index_slider where id = #{id}")
    Swiper getIndexSwiperById(Integer id);
    /*查询首页所有的轮播图图片及描述*/
    @Update("update index_slider set img = #{img}, text = #{text} where id = #{id}")
    void updateIndexSwiper(Swiper swiper);

    /*查询预征班所有的轮播图图片及描述*/
    @Select("select * from precollect_swiper")
    List<SwiperVO> getAllPPTSwiper();
    /*查询预征班所有的轮播图图片及描述*/
    @Select("select * from precollect_swiper where id = #{id}")
    SwiperVO getPPTSwiperById(Integer id);
    /*查询预征班所有的轮播图图片及描述*/
    @Update("update precollect_swiper set img = #{img}, text = #{text} where id = #{id}")
    void updatePPTSwiper(Swiper swiper);
}
